package com.tangsm.spring.mvc.mybatis.domain.entity;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;

/**
 * 家庭成员
 */
public class NestPerson {
    /**
     * 名称
     */
    @NotNull
    private String name;

    /**
     * 人实体
     */
    @Valid
    private Person person;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Person getPerson() {
        return person;
    }

    public void setPerson(Person person) {
        this.person = person;
    }

    @Override
    public String toString() {
        return "NestPerson{" +
                "name='" + name + '\'' +
                ", person=" + person.toString() +
                '}';
    }
}
